package com.wfu.module_base.utils;


import android.support.v4.app.Fragment;

import com.alibaba.android.arouter.launcher.ARouter;

/**
 * ARouter 全局配置在Base module 中
 */
public class RouteUtils {

    /**
     * 本地视频
     */
    public final static String LOCAL_VIDEO_FRAGMENT = "/video/fragment";
    /**
     * 网络视频
     */
    public final static String NET_VIDEO_FRAGMENT = "/move/fragment";
    /**
     * 本地音乐
     */
    public final static String LOCAL_AUDIO_FRAGMENT = "/audio/fragment";
    /**
     * 网络音乐
     */
    public final static String NET_AUDIO_FRAGMENT = "/music/fragment";

    /**
     * 获取本地视频
     *
     * @return
     */
    public static Fragment getVideoFragment() {
        Fragment fragment = (Fragment) ARouter.getInstance().build(LOCAL_VIDEO_FRAGMENT).navigation();
        return fragment;
    }

    /**
     * 网络视频
     *
     * @return
     */
    public static Fragment getNetVideoFragment() {
        Fragment fragment = (Fragment) ARouter.getInstance().build(NET_VIDEO_FRAGMENT).navigation();
        return fragment;
    }

    /**
     * 本地音乐
     *
     * @return
     */
    public static Fragment getAudioFragment() {
        Fragment fragment = (Fragment) ARouter.getInstance().build(LOCAL_AUDIO_FRAGMENT).navigation();
        return fragment;
    }

    /**
     * 网络音乐
     *
     * @return
     */
    public static Fragment getNetAudioFragment() {
        Fragment fragment = (Fragment) ARouter.getInstance().build(NET_AUDIO_FRAGMENT).navigation();
        return fragment;
    }
}
